<template>
    <div class="box">
        <baioti title="详情"></baioti>
        <van-tabs v-model:active="active">
            <van-tab title="商品">
                <lunbo :user="list.pics"></lunbo>
                <p>{{ list.goods_name }}</p>
                <p style="color: red;">${{ list.goods_price }}</p>
            </van-tab>
            <van-tab title="详情">
                <div v-html="list.goods_introduce"></div>
            </van-tab>
            <van-tab title="评价">内容 3</van-tab>
        </van-tabs>
    </div>
</template>

<script setup>
import { ref } from 'vue'
import { detailApi } from '@/api/api'
import { useRoute, useRouter } from 'vue-router'
import baioti from '@/components/baioti.vue'
import lunbo from '@/components/lunbo.vue'


const active = ref(0);
const router = useRouter()
const route = useRoute()
let goods_id = ref(route.query.goods_id)
console.log(goods_id);

let list = ref("")
const getlist = () => {
    detailApi(goods_id.value).then(res => {
        list.value = res.data.message
    })
}
getlist()
</script>

<style lang="scss" scoped></style>